package cn.tedu.csmall.product.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

@Data
public class CategoryAddNewParam {

    @NotNull(message = "类别名称不能为空")
    @ApiModelProperty(value = "类别名称", required = true, example = "测试类别001")
    private String name;

    @Range(min = 0)
    private Long parentId;

    private String keywords;

    @NotNull(message = "类别排序不能为空")
    @Range(max = 99)
    @ApiModelProperty(value = "类别排序", required = true, example = "99")
    private Integer sort;

    private String icon;

    @Range(max = 99)
    private Integer enable;

    @Range(max = 1)
    private Integer isDisplay;
}
